﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace AvaProvi
{
    public partial class ctlGeneralidades : AvaProvi.ControlBase
    {
        public ctlGeneralidades()
        {
            InitializeComponent();
        }

        public override void ActualizaDatos()
        {
            clsAvaluo_CRN.AvaluoActual.Guardar();
            this.ActualizaPanel();
        }

        public override void ActualizaPanel()
        {
            this.bsAvaluoActual.DataSource = clsAvaluo_CRN.AvaluoActual;
            this.bsInmueble.DataSource = clsAvaluo_CRN.AvaluoActual.Inmueble;
            this.bsAvaluoActual.ResetBindings(false);
            this.bsInmueble.ResetBindings(false);
        }

        private void cbxIntermediario_SelectedIndexChanged(object sender, EventArgs e)
        {
            gbxInfonavit.Enabled = (clsAvaluo_CRN.AvaluoActual.FolioIntermediario == "30001"?true:false);
        }
    }
}
